import { createRouter, createWebHistory } from "vue-router";
import IndexView from '../view/IndexView.vue'
import NotFound from '../view/NotFound.vue'

const routes = [
    {
        path: '/',
        redirect: '/login'
    },
    {
        path: '/index',
        name: 'index',
        component: IndexView,
    },
    {
        path: '/404',
        name: '404',
        component: NotFound,
    },
    {
        path: '/:catchAll(.*)',
        redirect: '/404'
    }

]

const router = createRouter({
    history: createWebHistory(),
    routes: routes
})

export default router